home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 567 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: David Byrden <100101.2547@compuserve.com>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Generic Object Callbacks
  5. Date: 27 Feb 1996 10:48:27 PST
  6. Organization: self-employed
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4gvdbs$ccf@news.bridge.net>
  9. References: <pgpmoose.199602221531.14635@isolde.mti.sgi.com> <4gsi2p$905@bcarh8ab.bnr.ca> <4guh9e$jt6@sdaw04.seinf.abb.se>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: 27 Feb 1996 17:00:44 GMT
  12. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMTNSDEy4NqrwXLNJAQHVdgH/a11wVrV3mNnzVuQP+R2292xnRTa9eORX
  15.     Mvi+GetVycE9B0306+M/JZI5/tbc3w8NJ6HqRSh2IaL+uxFLcmbaRw==
  16.     =YFv2
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. >> There exist a rather simple solution using a static member function.
  20. >> Instead of having the callback call a normal member function it can
  21. >> call a static callback member function with the object as a
  22. >> argument
  23.  
  24.   This would require to caller to store and pass the address of the 
  25. object. Since a different static function would exist for each 
  26. callbackable member of the class, the caller would have to keep and use 2 
  27. items of data. He would presumably wrap them in a class for convenience, 
  28. at which point he would have reinvented most of the work done by Richard 
  29. Hickey's callback class.
  30.  
  31.                                 David
  32. ---
  33. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  34.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  35.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  36.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  37.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  38. ]
  39.